<?xml version="1.0" encoding="UTF-8" ?>
<%
	ApplicationModel applicationModel = (ApplicationModel)request.getAttribute("applicationModel");
	List<PageModel> pageList = (List<PageModel>)request.getAttribute("pageList");
%>
<rss version="2.0">
  <channel>
    <title><%=applicationModel.getApplicationName() %></title>
    <link>http://<%=applicationModel.getApplicationId() %>.appspot.com/</link>
    <language>ja</language>
    <description><%=applicationModel.getDescription() %></description>
    <copyright>Copyright © 2011 it-trick All Rights Reserved</copyright>
    <%
	for(PageModel pageModel: pageList) {
		ChapterModel chapterModel = pageModel.getChapterModelRef().getModel();
		ChannelModel channelModel = chapterModel.getCategoryModelRef().getModel().getChannelModelRef().getModel();
		String lastmod = new java.text.SimpleDateFormat( "EEE, d MMM yyyy HH:mm:ss Z", java.util.Locale.US).format(pageModel.getLastmod());
	%>
    <item>
      <title><%=pageModel.getName() %></title>
      <link>http://<%=applicationModel.getApplicationId() %>.appspot.com/<%=channelModel.getKeyString() %>/c<%=chapterModel.getKeyString() %>/page<%=pageModel.getKeyString() %>.html</link>
      <description><%=pageModel.getDescription() %></description>
      <pubDate><%=lastmod %></pubDate>
      <category><%=channelModel.getName() %></category>
    </item>
    <%} %>
  </channel>
</rss>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<%@ page import="jp.co.cos.ittrick.channel.model.ApplicationModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ChannelModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.CategoryModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ChapterModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.PageModel" %>
<%@ page import="java.util.List" %>